package com.weicoder.shop.po

import javax.persistence.Entity
import org.hibernate.annotations.DynamicInsert
import org.hibernate.annotations.DynamicUpdate 
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Component
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import com.weicoder.base.annotation.Cache
import com.weicoder.site.entity.EntityPage
import com.weicoder.site.entity.base.BaseEntityId;
import scala.beans.BeanProperty

/**
 * 栏目实体
 * @author WD
 * @since JDK7
 * @version 1._ 2_11-_4-17
 */
@Component
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
@Entity
@Cache
@DynamicInsert
@DynamicUpdate
class Category extends BaseEntityId {
  // 上级栏目ID
  @BeanProperty
  var categoryId: Integer = _
  // 页面信息
  //	@Type(type = "com.weicoder.base.dao.hibernate.type.JsonType")
  @BeanProperty
  var page: EntityPage = _
  // 名称
  @BeanProperty
  var name: String = _
}
